package agents;

import gui.HomeGUI;
import behaviours.Initialise;
import jade.core.Agent;
import jade.core.behaviours.Behaviour;
import jade.core.behaviours.OneShotBehaviour;
import jade.wrapper.AgentContainer;
import jade.wrapper.ControllerException;

public class Initialiser extends Agent {
protected void setup() {
		
		/*
		 * Announce operation of this agent.
		 */
		System.out.println(getAID().getName() + " running.");
		
		/*
		 * Deploy Ticker agent.
		 */
		super.addBehaviour(new Initialise("Ticker","agents.TickAgent",null));
		
		/*
		 * Deploy Sniffer agent.
		 */
		//super.addBehaviour(new Initialise("Sniffer","jade.tools.sniffer.Sniffer",new Object[]{ "*" }));
		
		/*
		 * Deploy Home agent.
		 */
		super.addBehaviour(new Initialise("HomeAgent1", "agents.HomeAgent",new Boolean[]{true}));
		super.addBehaviour(new Initialise("HomeAgent2", "agents.HomeAgent", new Boolean[]{true}));
		
		super.addBehaviour(new Initialise("HomeAgent3", "agents.HomeAgent",new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent4", "agents.HomeAgent", new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent5", "agents.HomeAgent",new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent6", "agents.HomeAgent", new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent7", "agents.HomeAgent",new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent8", "agents.HomeAgent", new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent9", "agents.HomeAgent",new Boolean[]{false}));
		super.addBehaviour(new Initialise("HomeAgent10", "agents.HomeAgent", new Boolean[]{false}));
		
		super.addBehaviour(new Initialise("Retailer1", "agents.RetailerAgent", new Float[]{0.33f}));
		super.addBehaviour(new Initialise("Retailer2", "agents.RetailerAgent", new Float[]{0.33f}));
		super.addBehaviour(new Initialise("Retailer3", "agents.RetailerAgent", new Float[]{0.33f}));
		//super.addBehaviour(new Initialise("Retailer4", "agents.RetailerAgent", new Float[]{0.33f}));
		//super.addBehaviour(new Initialise("Retailer5", "agents.RetailerAgent", new Float[]{0.33f}));
	}
	
	protected void takeDown() {
		
		/*
		 * Announce termination of this agent.
		 */
		System.out.println(getAID().getName() + " terminating.");
	}
}
